package com.example.demo04.controller;


import com.example.demo04.pojo.Users;
import com.example.demo04.service.UserDaoService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.servlet.ModelAndView;

import java.util.List;

@Controller
public class demo {
    @Autowired
    private UserDaoService userDaoService;

    @RequestMapping("/regist.htm")
    public String regist01(){
        List<Users> list=userDaoService.getAll();
        for(int i=0;i<list.size();i++){
             System.out.print(list.get(i).getUsername());
        }
        System.out.print("120");
        return "regist.html";
    }
}
